console.log(arguments.callee.toString());
/* 
function (exports, require, module, __filename, __dirname) {
console.log(arguments.callee.toString());
}


*/
console.log(__dirname);//表示的是当前正在执行的js文件所在的目录
console.log(__filename);//表示的是当前正在执行的js文件完整路径

/* 
D:\a-jinsi-courseware\1.class course\4.w2203A\7.node\node-2203
D:\a-jinsi-courseware\1.class course\4.w2203A\7.node\node-2203\9.路径.js


*/
const fs = require('fs');
const path = require('path');
console.log(__dirname);
console.log('==========');
// D:\a-jinsi-courseware\1.class course\4.w2203A\7.node\node-2203\test1.txt
console.log(path.join(__dirname,'test1.txt'));
const fileName = path.join(__dirname,'test1.txt');

// D:\a-jinsi-courseware\1.class course\4.w2203A\7.node\node-2203
fs.readFile(fileName,{flag:'r'},(err,data)=>{
    if(!err){
        console.log(data);
        console.log(data.toString());
        // <Buffer e5 93 b2 e4 b9 a6 e8 af b4 ef bc 9a e6 b4 8b e6 b4 8b e5 be 88 e5 b8 85 e6 b4 8b e6 b4 8b e8 af b4 ef bc 9a e5 93 b2 e4 b9 a6 e5 be 88 e5 a5 bd ef bc ... 64 more bytes>
    }else{
        console.log(err);
    }
})
